package com.wiscamp.ninechapters.problems.application.assemblers;

import com.wiscamp.ninechapters.problems.application.dto.commands.types.CreateProblemTypeCommand;
import com.wiscamp.ninechapters.problems.application.dto.commands.types.UpdateProblemTypeCommand;
import com.wiscamp.ninechapters.problems.application.dto.vo.types.ProblemTypeVO;
import com.wiscamp.ninechapters.problems.domain.models.types.ProblemType;
import org.mapstruct.Mapper;
import org.mapstruct.NullValuePropertyMappingStrategy;
import org.mapstruct.ReportingPolicy;
import org.mapstruct.factory.Mappers;

@Mapper(componentModel = "spring",
        unmappedTargetPolicy = ReportingPolicy.IGNORE,
        unmappedSourcePolicy = ReportingPolicy.IGNORE,
        nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE)
public interface ProblemTypeAssembler {
    ProblemTypeAssembler Instance = Mappers.getMapper(ProblemTypeAssembler.class);

    ProblemTypeVO toProblemTypeVO(ProblemType entity);

    ProblemType fromCreateCommand(CreateProblemTypeCommand command);

    ProblemType fromUpdateCommand(UpdateProblemTypeCommand updateCommand);
}
